//
//  ShowQRCodeViewController.m
//  SenMo
//
//  Created by zengyuan on 16/2/1.
//  Copyright © 2016年 ZengYuan. All rights reserved.
//

#import "ShowQRCodeViewController.h"
#import "QRCodeGenerator.h"

@interface ShowQRCodeViewController ()

@end

@implementation ShowQRCodeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    CGFloat width = 250;
    
    imgView = [[UIImageView alloc]initWithFrame:CGRectMake((self.view.frame.size.width - width)/2, 10, width, width)];
    [self.view addSubview:imgView];
    imgView.contentMode = UIViewContentModeScaleAspectFit;
    imgView.clipsToBounds=YES;
    
    UIImage *image = [QRCodeGenerator qrImageForString:self.qrcode imageSize:width];
    imgView.image=image;
    
    self.titleLabel.text=@"二维码";
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
